// let faDom = document.querySelector(".login-container");
// generateLogin(faDom);

let tabsLi = document.querySelectorAll(".tabs-list>li");
let tabsCont = document.querySelectorAll(".tabs-bottom>div");
tabsLi.forEach(function (li, index) {
  li.addEventListener("click", function () {
    tabsLi.forEach(function (v, i) {
      v.classList.remove("active");
      tabsCont[i].classList.remove("on");
    });
    this.classList.add("active");
    tabsCont[index].classList.add("on");
  });
});

let btn = document.querySelector(".loginBtn");
let uname = document.querySelector(".user");
let pwd = document.querySelector(".userpwd");
btn.addEventListener("click", function () {
  if (uname.value !== "18382736701") return alert("用户名或密码错误");
  if (pwd.value !== "123456") return alert("用户名或密码错误");

  alert("登录成功");
  setTimeout(function () {
    location.href = "../home/home.html";
  }, 2000);
});
